FROM intelligence-stack/centos-dev:8
RUN yum install -y https://repo.saltstack.com/py3/redhat/salt-py3-repo-latest.el8.noarch.rpm
RUN yum install -y passwd supervisor
RUN yum -y install salt-master salt-minion salt-ssh salt-syndic salt-api
ADD ./conf/master /etc/salt
ADD ./conf/minion /etc/salt
ADD ./conf/master.ini /etc/supervisord.d/
ADD ./conf/minion.ini /etc/supervisord.d/
ADD ./conf/api.ini /etc/supervisord.d/
RUN useradd -M -s /sbin/nologin saltops

RUN echo "saltops" | passwd saltops --stdin
RUN mkdir /run/supervisor
CMD supervisord -n